// 角色模型
module.exports = (sequelize, Sequelize) => {
    return sequelize.define("roles", {
        id: {
            type: Sequelize.INTEGER,
            comment: '主键',
            notNull: true,
            primaryKey: true,
            autoIncrement: true, // 自增整形主键
        },
        roleName: {
            type: Sequelize.STRING,
            notNull: true,
            notEmpty: true,
            comment: '角色名称',
            field:'role_name'
        },
        sort: {
            type: Sequelize.INTEGER,
            comment: '显示排序',
        },
        state: {
            type: Sequelize.BOOLEAN,
            comment: '状态',
            defaultValue: true
        },
        roleDesc: {
            type: Sequelize.STRING,
            comment: '角色描述',
            field:'role_desc'
        },
    })
};